﻿@using pdtransport_v2._0.Areas.back.Controllers
@{
    ViewBag.Title = "Sua";
    Layout = "~/Areas/back/Views/Shared/_back_layout.cshtml";
}


<h2>Sửa</h2>
<div class="block">
@if (@ViewBag.Sua == 1)
{
    <div class="alert alert-success">
        <button type="button" class="close" data-dismiss="alert">
            ×</button>
        <h4>
            Thành Công!</h4>
        Chỉnh sửa thông tin thành công.
    </div>
}
    <form method="post" enctype="multipart/form-data">
    <table class="form">
        <tbody>
        <input type="hidden" name="idnv" value="@ViewBag.NhanVien.nv.IDNV" />
            <tr>
                <td class="col1">
                    <label>
                        Mã Nhân Viên</label>
                </td>
                <td class="col2">
                    <input type="text" disabled name="manv" value="@ViewBag.NhanVien.nv.MaNV"/>
                </td>
            </tr>
            <tr>
                <td class="col1">
                    <label>
                        Họ Tên</label>
                </td>
                <td class="col2">
                    <input class="mini" type="text" name="hoten" value="@ViewBag.NhanVien.nv.HoTen" />
                </td>
            </tr>
            <tr>
                <td>
                    <label>
                        Địa Chỉ</label>
                </td>
                <td>
                    <input class="medium" type="text" name="diachi" value="@ViewBag.NhanVien.nv.DiaChi" />
                </td>
            </tr>
            <tr>
                <td>
                    <label>
                       Số điện thoại</label>
                </td>
                <td>
                    <input type="text" name="sodt" value="@ViewBag.NhanVien.nv.SoDT"/>
                </td>
            </tr>
           <tr>
                <td>
                    <label>
                       CMND</label>
                </td>
                <td>
                    <input type="text" name="cmnd" value="@ViewBag.NhanVien.nv.CMND" />
                </td>
            </tr>
            <tr>
                <td>
                    <label>
                       Username</label>
                </td>
                <td>
                    <input type="text" disabled name="username" value="@ViewBag.NhanVien.tk.username" />
                </td>
            </tr>
            <tr>
                <td>
                    <label>
                       Password</label>
                </td>
                <td>
                    <input type="text" name="password">
                    <span class="error">Điền password mới nếu muốn thay đổi</span>
                </td>
            </tr>

            <tr>
                <td>
                    <label>
                       Tình trạng</label>
                </td>
                <td>
                    <select name="tinhtrang">
                    @if (ViewBag.NhanVien.nv.TinhTrang == 1)
                    {
                        <option value='1' selected="selected"> Enabled </option>
                        <option value='0'> Disabled </option>
                    }
                    else
                    {
                        <option value='1'> Enabled </option>
                        <option value='0' selected="selected"> Disabled </option>
                    }
                    </select>
                </td>
            </tr>
            <tr>
                <td class="col1">
                </td>
                <td class="col2">
                    <button type="submit" class="btn btn-small btn-blue">Sửa</button>
                    @Html.ActionLink("Thoát", "Danhsach", "Nhanvien", new{@class="btn btn-small"})
                </td>
            </tr>
        </tbody>
    </table>
    </form>
</div>




